#include <iostream>
//#include <map>
//#include <string>
#ifndef NODE_H
#define NODE_H
#include "Node.h"
#endif

//using namespace std;

void Node::respond() {
        std::cout << "I am a node!" << std::endl;
}

void Node::setName(std::string name) {
        _name = name;
}

std::string Node::getName() {
        return _name;
}

bool Node::hasName() {
        return !_name.empty();

}

void Node::printName() {
        std::cout << "Hello my name is " << _name << std::endl;
}

void Node::setParent(Node *parent) {
        _parent = parent;
}

Node *Node::getParent() {
        return _parent;
}

void Node::addChild(Node* child) {
        std::string childName = child->getName();
            _children[childName] = child;
}

Node* Node::getChild(std::string childName) {
        return _children[childName];
}

int Node::childExists (std::string childName) {
    if (_children.find(childName) == _children.end()) { 
        return 0 ;
    } 
    else {
        return 1;
    }
}

std::map<std::string, Node*> Node::getChildren() {
    return _children;
}


void Node::addSeq(std::string seqName, std::string seq) {
    _seq[seqName] = seq;
}

std::string Node::getSeq(std::string seqName) {
    return _seq[seqName];
}

std::map<std::string, std::string> Node::getSequences() {
    return _seq;
}

